package cn.itcast.tanhua.mytanhuaserver.service;

import cn.itcast.tanhua.pojo.BlackList;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * @author 陈英航
 * @since 2021/12/6 11:34
 */
public interface BlacklistService {

    /**
     * 查询黑名单列表
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    IPage<BlackList> queryBlacklist(Long userId, Integer page, Integer pageSize);

    /**
     * 移除黑名单
     * @param userId
     * @param blackUserId
     * @return
     */
    Boolean delBlacklist(Long userId, Long blackUserId);

    /**
     * 添加黑名单
     * @param userId
     * @param blackUserId
     * @return
     */
    Boolean addBlacklist(Long userId, Long blackUserId);

    /**
     * 根据用户id查询黑名单id
     * @param userId
     * @return
     */
    public List<Long> queryBlacklistById(Long userId);

    /**
     * 查询是否已经在黑名单上
     * @param userId
     * @param blackUserId
     * @return
     */
    public Boolean queryIfBlacklist(Long blackUserId,Long userId);

}
